<!DOCTYPE HTML>
<html lang="en">
<head>
<title>SplashTextOn / SplashTextOff - Syntax &amp; Usage | AutoHotkey</title>
<meta name="description" content="The SplashTextOn and SplashTextOff commands create or remove a customizable text popup window." />
<meta name="ahk:equiv-v2" content="objects/Gui.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>SplashTextOn / SplashTextOff</h1>

<p>Creates or removes a customizable text popup window.</p>

<pre class="Syntax">
<span class="func">SplashTextOn</span> <span class="optional">, Width, Height, Title, Text</span>
<span class="func">SplashTextOff</span>
</pre>
<h2>Parameters</h2>
<dl>

  <dt>Width</dt>
  <dd><p>The width in pixels of the Window. Default 200. This parameter can be an <a href="../Variables.htm#Expressions">expression</a>.</p></dd>

  <dt>Height</dt>
  <dd><p>The height in pixels of the window (not including its title bar). Default 0 (i.e. just the title bar will be shown). This parameter can be an <a href="../Variables.htm#Expressions">expression</a>.</p></dd>

  <dt>Title</dt>
  <dd><p>The title of the window. Default empty (blank).</p></dd>

  <dt>Text</dt>
  <dd><p>The text of the window. Default empty (blank). If <em>Text</em> is long, it can be broken up into several shorter lines by means of a <a href="../Scripts.htm#continuation">continuation section</a>, which might improve readability and maintainability.</p></dd>

</dl>
<h2>Remarks</h2>
<p>To have more control over layout and font name/color/size, use the <a href="Progress.htm">Progress</a> command with the <code>zh0</code> option, which omits the bar and displays only text. For example: <code>Progress, zh0 fs18, Some 18-point text to display</code>.</p>
<p>Use the SplashTextOff command to remove an existing splash window.</p>
<p>The splash window is &quot;always on top&quot;, meaning that it stays above all other normal windows. To change this, use <code><a href="WinSet.htm">WinSet</a>, AlwaysOnTop, Off, &lt;insert title of splash window&gt;</code>. <a href="WinSet.htm">WinSet</a> can also make the splash window transparent.</p>
<p><a href="WinMove.htm">WinMove</a> can be used to reposition and resize the SplashText window after it has been displayed with this command.</p>
<p>Unlike <a href="Progress.htm">Progress</a>, <a href="Progress.htm">SplashImage</a>, <a href="MsgBox.htm">MsgBox</a>, <a href="InputBox.htm">InputBox</a>, <a href="FileSelectFile.htm">FileSelectFile</a>, and <a href="FileSelectFolder.htm">FileSelectFolder</a>, only one SplashText window per script is possible.</p>
<p>If SplashTextOn is used while the splash window is already displayed, the window will be recreated with the new parameter values. However, rather than recreating the splash window every time you wish to change its title or text, better performance can be achieved by using the following, especially if the window needs to be changed frequently:</p>
<pre><a href="WinSetTitle.htm">WinSetTitle</a>, &lt;insert title of splash window&gt;, , NewTitle
<a href="ControlSetText.htm">ControlSetText</a>, Static1, NewText, &lt;insert title of splash window&gt;</pre>
<h2>Related</h2>
<p><a href="Progress.htm">Progress</a>, <a href="Progress.htm">SplashImage</a>, <a href="ToolTip.htm">ToolTip</a>, <a href="MsgBox.htm">MsgBox</a>, <a href="InputBox.htm">InputBox</a>, <a href="FileSelectFile.htm">FileSelectFile</a>, <a href="FileSelectFolder.htm">FileSelectFolder</a>, <a href="WinMove.htm">WinMove</a>, <a href="WinSet.htm">WinSet</a></p>
<h2>Examples</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>SplashTextOn, , , Displays only a title bar.
Sleep, 2000
SplashTextOn, 400, 300, Clipboard, The clipboard contains:`n%clipboard%
WinMove, Clipboard, , 0, 0  <em>; Move the splash window to the top left corner.</em>
MsgBox, Press OK to dismiss the SplashText
SplashTextOff</pre>
</div>

</body>
</html>
